﻿using LitJson;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class SettingPanel : MonoBehaviour
{
    public Button Button_start;
    public Button Button_help;
    public Button Button_exit;
    
    void Awake()
    {
        AddEvent();
    }

    void AddEvent()
    {
        EventTriggerListener.Get(Button_start.gameObject, null).onClick = OnClick_Button_start;
        EventTriggerListener.Get(Button_help.gameObject, null).onClick = OnClick_Button_help;
        EventTriggerListener.Get(Button_exit.gameObject, null).onClick = OnClick_Button_exit;
    }
    void OnClick_Button_start(GameObject go, object data = null)
    {
        NotifyEvent e = new NotifyEvent(NotifyType.ENTER_MAP, null, this);
        NotifacitionCenter.GetInstance().postNotification(e);

        UIManager.GetInstance().SettingPanel.gameObject.SetActive(false);
        UIManager.GetInstance().GamePanel.gameObject.SetActive(true);
    }

    void OnClick_Button_help(GameObject go, object data = null)
    {
        
    }
    
    void OnClick_Button_exit(GameObject go, object data = null)
    {
        
    }
    

}